package main

import (
	"fmt"
	"phoenix/gin_web/dao"
	"phoenix/gin_web/model"
)

func main() {
	dsn := "songhan:123456@tcp(47.94.200.117:3306)/gorm_test?charset=utf8mb4&parseTime=True&loc=Local"
	db, err := dao.OpenMysqlDbWithDsn(dsn)
	if err != nil {
		fmt.Println("Open db got err=", err)
		return
	}
	
	err = dao.CreateTable(db, &model.Product{})	
	fmt.Println("CreateTable product got err=", err)
}